import React, {Component} from 'react'
import {
    Text,
    View,
    StyleSheet,
    Button,
    TextInput,
    Image,
    FlatList,
    ScrollView,
    InteractionManager,
    Animated,
    TouchableOpacity, TouchableHighlight, ViewStyle
} from 'react-native'
import {inject, observer} from "mobx-react";
import {Actions} from "react-native-router-flux";
import styles from "../../style";
import * as Constant from "../../style/constant";
import Icon from "react-native-vector-icons/Ionicons";

interface CustomRightButtonProps {
    navBarButtonColor?: string,
    onRight:()=>void
}

interface CustomRightButtonState {

}

@observer
export default class CustomRightButton extends Component<CustomRightButtonProps, CustomRightButtonState> {
    render() {
        return (
            <TouchableOpacity onPress={this.props.onRight} style={[styles.centered, {paddingHorizontal: 2 * Constant.normalMarginEdge}]}>
                <Icon name={'md-share-alt'} size={26} color={this.props.navBarButtonColor || "#555555"}/>
            </TouchableOpacity>
        )
    }
}


const CustomRightButtonStyles = StyleSheet.create({
    container: {}
});
